#! /bin/sh
# Sufdmod2 --- example script for sufdmod2
# finite-difference modeling: part 1, the movie
# Author: John Stockwell
WIDTH=450
HEIGHT=450
WIDTHOFF1=50
WIDTHOFF2=530
HEIGHTOFF1=50
HEIGHTOFF2=530

n1=500 d1=5 f1=0.0 label1="Depth (km)"
n2=500 d2=5 f2=0.0 label2="Distance (km)"
xs=1250 zs=1250 hsz=1000 vsx=1000 verbose=2
vsfile="vseis.out" ssfile="sseis.out" hsfile="hseis.out"
tmax=6.0 mt=25 pml=0 pml_thick=4

#makevel nx=$n2 nz=$n1 v000=3000 >vel.out


cellauto rule=110 ic=2 nc=100 fill=1 f0=300 f1=3000 n1=$n1 > vel.out
ximage < vel.out  \
	title="Cellular Automata: Rule 110" \
	windowtitle="Earth Model" \
	label1="$label1" label2="$label2" \
	n1=$n1 d1=$d1 f1=$f1 n2=$n2 d2=$d2 f2=$f2 \
	wbox=700 hbox=700 &


sufdmod2 <vel.out nz=$n1 dz=$d1 nx=$n2 dx=$d2 verbose=1 \
	xs=$xs zs=$zs hsz=$hsz vsx=$vsx hsfile=$hsfile \
	vsfile=$vsfile ssfile=$ssfile verbose=$verbose \
	tmax=$tmax abs=1,1,1,1 mt=$mt pml=$pml pml_thick=$pml_thick \
	> snaps.su

suxmovie < snaps.su clip=2.0 \
	title="Acoustic Finite-Differencing (Frame %g)" \
	windowtitle="Movie" \
	label1="$label1" label2="$label2" \
	n1=$n1 d1=$d1 f1=$f1 n2=$n2 d2=$d2 f2=$f2 \
	cmap=gray loop=2 interp=0 \
	-geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF2}+${HEIGHTOFF1} &

suximage < hseis.out perc=99 \
	title="Shot Record @ z=1000" \
	windowtitle="Shot" \
	label1="Time (sec)" label2="$label2" \
	n1=$n1 d1=$d1 f1=$f1 n2=$n2 d2=$d2 f2=$f2 \
	width=700 height=700 &

suximage < vseis.out  perc=99 \
	title="VSP @ x=1000" \
	windowtitle="Shot" \
	label1="$label2" label2="Time (sec)" \
	n1=$n1 d1=$d1 f1=$f1 n2=$n2 d2=$d2 f2=$f2 \
	width=700 height=700 &

suxwigb < sseis.out perc=99  \
	title="Receiver at source location" \


exit 0

